import 'package:fluttertoast/fluttertoast.dart';
import 'package:raze/potions/raze_constant.dart';

/// 提示通知组件，支持四种类型：成功、失败、警告、信息
/// 使用 fluttertoast 实现轻量级提示
class NotifierGlimmer {
  /// 显示成功提示
  /// [message] 提示信息内容
  static void revealSuccess(String message) {
    Fluttertoast.showToast(
      msg: message,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.CENTER,
      backgroundColor: RazeConstants.green,
      textColor: RazeConstants.white,
      fontSize: 14.0,
    );
  }

  /// 显示失败提示
  /// [message] 提示信息内容
  static void revealFailure(String message) {
    Fluttertoast.showToast(
      msg: message,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.CENTER,
      backgroundColor: RazeConstants.red,
      textColor: RazeConstants.white,
      fontSize: 14.0,
    );
  }

  /// 显示警告提示
  /// [message] 提示信息内容
  static void revealWarning(String message) {
    Fluttertoast.showToast(
      msg: message,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.CENTER,
      backgroundColor: RazeConstants.yellow,
      textColor: RazeConstants.black,
      fontSize: 14.0,
    );
  }

  /// 显示信息提示
  /// [message] 提示信息内容
  static void revealInfo(String message) {
    Fluttertoast.showToast(
      msg: message,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.CENTER,
      backgroundColor: RazeConstants.blue,
      textColor: RazeConstants.white,
      fontSize: 14.0,
    );
  }
}
